<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions" 
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
  targetNamespace="Examples">
  
  <process id="subProcessLocalInputSingleVariableExpression" isExecutable="true">
  
    <startEvent id="theStart" />
    
    <sequenceFlow id="flow1" sourceRef="theStart" targetRef="userTask1" />
    
    <userTask id="userTask1" name="Task before subprocess" />
    
    <sequenceFlow id="flow2" sourceRef="userTask1" targetRef="callSubProcess" />
    
    <callActivity id="callSubProcess" camunda:caseRef="oneTaskCase">
      <extensionElements>
        <camunda:inputOutput>
          <camunda:inputParameter name="inputParameter">${42}</camunda:inputParameter>
        </camunda:inputOutput>
        <camunda:in sourceExpression="${inputParameter + 1}" target="mappedInputParameter" local="true" />
      </extensionElements>
    </callActivity>
    
    <sequenceFlow id="flow3" sourceRef="callSubProcess" targetRef="userTask2" />
    
    <userTask id="userTask2" name="Task after subprocess" />
    
    <sequenceFlow id="flow4" sourceRef="userTask2" targetRef="callSubProcess2" />
    
    <callActivity id="callSubProcess2" camunda:caseRef="oneTaskCase">
      <extensionElements>
        <camunda:in sourceExpression="${globalVariable + 1}" target="mappedInputParameter" local="true" />
      </extensionElements>
    </callActivity>
  
    <sequenceFlow id="flow5" sourceRef="callSubProcess2" targetRef="theEnd" />
    
    <endEvent id="theEnd" />
    
  </process>

</definitions>